/* 图形测试界面样式 */
.graphics-test-interface {
  min-height: 100vh;
  background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* 顶部导航 */
.test-interface-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(74, 144, 226, 0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.return-button {
  width: 160px;
  height: 40px;
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.9;
  background-color: transparent;
  flex-shrink: 0;
}

.return-button:hover {
  opacity: 1;
  transform: scale(1.05);
}

.return-button:active {
  transform: scale(0.95);
}

.countdown-display {
  font-size: 32px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  transition: color 0.3s ease;
}

.initial-countdown {
  font-size: 48px;
  animation: pulse 1s infinite;
}

.test-countdown {
  font-family: 'Courier New', monospace;
}

.finished-text {
  color: #28a745;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* 测试内容区域 */
.test-content {
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px;
  overflow-y: auto;
}

.initial-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: white;
  text-align: center;
}

.initial-message p {
  font-size: 24px;
  margin: 20px 0;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* 图片容器 */
.images-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 20px;
}

.image-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.image-item {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid transparent;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
}

.image-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.image-item.selected {
  transform: translateY(-5px) scale(1.05);
}

.image-item.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(50%);
}

.image-item.disabled:hover {
  transform: none;
  box-shadow: none;
}

.image-item.correct {
  border-color: #28a745;
  background: rgba(40, 167, 69, 0.2);
  animation: correctPulse 0.6s ease-out;
}

.image-item.wrong {
  border-color: #dc3545;
  background: rgba(220, 53, 69, 0.2);
  animation: wrongShake 0.6s ease-out;
}

@keyframes correctPulse {
  0% { transform: translateY(-5px) scale(1.05); }
  50% { transform: translateY(-8px) scale(1.1); box-shadow: 0 0 20px rgba(40, 167, 69, 0.6); }
  100% { transform: translateY(-5px) scale(1.05); }
}

@keyframes wrongShake {
  0%, 100% { transform: translateY(-5px) scale(1.05) translateX(0); }
  25% { transform: translateY(-5px) scale(1.05) translateX(-5px); }
  75% { transform: translateY(-5px) scale(1.05) translateX(5px); }
}

.pattern-test-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.loading-more {
  text-align: center;
  padding: 20px;
  color: white;
  font-size: 18px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* 底部统计信息 */
.bottom-statistics {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  padding: 15px 20px;
  z-index: 99;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}

.stat-item {
  color: white;
  font-weight: bold;
  font-size: 16px;
  padding: 8px 16px;
  border-radius: 8px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  text-align: center;
  min-width: 80px;
}

.stat-item.correct {
  background: rgba(40, 167, 69, 0.3);
  border: 1px solid #28a745;
}

.stat-item.wrong {
  background: rgba(220, 53, 69, 0.3);
  border: 1px solid #dc3545;
}

.stat-item.total {
  background: rgba(74, 144, 226, 0.3);
  border: 1px solid #4A90E2;
}

/* 测试结果 */
.test-result {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.result-content {
  background: white;
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: slideInScale 0.6s ease-out;
  max-width: 400px;
  width: 90%;
}

@keyframes slideInScale {
  from {
    transform: translateY(-50px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.result-content h2 {
  color: #333;
  margin-bottom: 20px;
  font-size: 28px;
}

.result-content p {
  color: #666;
  margin: 15px 0;
  font-size: 18px;
}

.correct-text {
  color: #28a745;
}

.wrong-text {
  color: #dc3545;
}

.back-to-selection {
  background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.back-to-selection:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
}

.back-to-selection:active {
  transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .test-interface-header {
    padding: 15px;
  }
  
  .return-button {
    width: 140px;
    height: 32px;
  }
  
  .countdown-display {
    font-size: 24px;
  }
  
  .initial-countdown {
    font-size: 36px;
  }
  
  .image-row {
    gap: 8px;
  }
  
  .bottom-statistics {
    gap: 15px;
    padding: 12px 15px;
  }
  
  .test-content {
    bottom: 0;
  }
  
  .stat-item {
    text-align: center;
    font-size: 14px;
    min-width: auto;
    padding: 6px 12px;
  }
  
  .result-content {
    padding: 30px 20px;
  }
  
  .result-content h2 {
    font-size: 24px;
  }
  
  .result-content p {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .test-content {
    padding: 15px;
  }
  
  .image-row {
    gap: 5px;
  }
  
  .countdown-display {
    font-size: 20px;
  }
  
  .initial-countdown {
    font-size: 28px;
  }
  
  .initial-message p {
    font-size: 18px;
  }
  
  .return-button {
    width: 120px;
    height: 28px;
  }
  
  .bottom-statistics {
    padding: 10px 12px;
    gap: 12px;
  }
  
  .test-content {
    bottom: 0;
  }
  
  .stat-item {
    font-size: 12px;
    padding: 5px 10px;
  }
}
